using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerStateBase
{
    protected StateMachine stateMachine;
    protected Player player;
    protected Animator playerAnimator;
    protected Rigidbody2D rb;
    protected string animName;
    public PlayerStateBase(StateMachine stateMachine, Player player, string animName)
    {
        this.stateMachine = stateMachine;
        this.player = player;
        this.animName = animName;
        playerAnimator = player.PlayerAnimator;
        rb = player.Rb;
    }

    public virtual void OnEnter()
    {
        playerAnimator.SetBool(animName, true);
    }

    public virtual void OnUpdate() { }

    public virtual void OnFixedUpdate() { }
    
    public virtual void OnLateUpdate(){ }
    public virtual void OnExit()
    {
        playerAnimator.SetBool(animName, false);
    }
}

